package study;

import static java.lang.System.out;

public class StudyJava {

    public static void main(String[] args) {
        Child b = new Child();
        out.println(b.name);
        out.println(((Base)b).name);
        out.println(b.getName());
    }
    
}

class Base {
    protected String name = "Base Name";
    
    public String getName() {
        return name;
    }    
}

class Child extends Base {
    protected String name = "Child Name";
          
}
